<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .hidDiv{
            background-color: rgba(266,0,0,0.5);
            left: 0px;
            top: 0px;
            width: 100%;
            height: 100%;
            position: absolute;
            visibility: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .contentDiv{
            width: 400px;
            height: 400px;
            background-color: whitesmoke;
            border: 1px solid white;
            padding: 50px;

        }
    </style>
    <script src="employee.js"></script>
    <script src="emService.js"></script>
    <script>

    </script>
</head>
<body>
<table border="1" width="80%" style="border-spacing:0px">
    <thead>
    <tr>
        <th  onclick="sort('code')">编号</th>
        <th>姓名</th>
        <th onclick="sort('money')">工资</th>
        <th>性别</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody id="data"></tbody>
</table>
姓名：<input type="text" id="nameTxt"><br>
<input type="button" value="查找" onclick="findByName()">
 <input type="button" value="添加" onclick="showAddDiv()">
<div class="hidDiv" id="addDIv">
    <div class="contentDiv">
        <form action="add" id="f1">
        编号：<input type="text" id="codeTxt" onblur="checkcode()">
        <span id="codeInfo"></span><br>
        姓名：<input type="text" id="emNameTxt" onblur="checkName()">
            <span id="nameInfo"></span><br>
        工资：<input type="text" id="moneyTxt"onblur="checkmoney()">
            <span id="moneyInfo"></span><br>
        性别: <input type="text" id="sexTxt"onblur="checksex()">
            <span id="sexInfo"></span><br>
            <br>
        <input type="button" value="添加" onclick="add()">
        </form>
    </div>
</div>

<div class="hidDiv" id="updateDiv">
    <div class="contentDiv">
        编号：<span id="codeSpan"></span><br>
        姓名：<span id="nameSpan"></span><br>
        工资：<input type="text" id="moneySpan"><br>
        性别:<span id="sexSpan"></span><br>
        <input type="button" value="添加" onclick="update()">
    </div>
</div>
</body>
</html>